<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@3.2.38/dist/vue.global.min.js"></script>
  <style>
    .isHidden:hover {
      opacity: 0.5;
    }
  </style>
</head>

<body>
  <div id="app">
    <img v-if="isShow" src="./img/冰露.jpg" />
    <img v-else src="./img/纯果乐.jpg" />
    <button @click="change">{{msg}}</button>
    <hr>
    <img class="isHidden" src="./img/冰露.jpg" alt="">
  </div>
</body>
<script>
  Vue.createApp({
    data() {
      return {
        isShow: true,
        msg: "图片1"
      }
    },
    methods: {
      change() {
        if (this.isShow) {
          this.msg = "图片2"
        } else {
          this.msg = "图片1"
        }
        this.isShow = !this.isShow
      }
    }
  }).mount('#app')
</script>

</html>